package com.cjm.one.model.system.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.cjm.one.model.base.BaseEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;

//@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SysUserStatusEnum implements BaseEnum {
    normal(0, "正常"),
    disabled(1, "已禁用");

    @EnumValue  //告诉MP，这个枚举在数据库中保存为这个字段的值
//    @JsonProperty
    private int code;

    private String message;
     SysUserStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
